import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }

//添加任务信息
export function addInTask(data) {
    return request({
        url: getUrl("admin/enterpriseTask/addInEnterpriseTask"),
        method: 'post',
        data
    })
}

//更新任务信息
export function updateInTaskRelease(data) {
    return request({
        url: getUrl("admin/enterpriseTask/updateInEnterpriseTask"),
        method: 'post',
        data
    })
}


export function deleteInTaskRelease(data) {
    return request({
        url: getUrl("admin/enterpriseTask/deleteInEnterpriseTask"),
        method: 'post',
        data
    })
}


//获取任务信息数据 getInTaskReleaseVo
export function getInTaskReleaseVo(data) {
    return request({
        url: getUrl("admin/enterpriseTask/getInEnterpriseTaskVo"),
        method: 'post',
        data
    })
}


//获取任务信息数据 getInTaskReleaseVo
export function getEnterpriseTaskInfoVo(data) {
    return request({
        url: getUrl("admin/enterpriseTask/getEnterpriseTaskInfoVo"),
        method: 'post',
        data
    })
}

//更新任务信息
export function updateInEnterpriseTaskInfo(data) {
    return request({
        url: getUrl("admin/enterpriseTask/updateInEnterpriseTaskInfo"),
        method: 'post',
        data
    })
}

export function taskReturn(data) {
    return request({
        url: getUrl("admin/enterpriseTask/taskReturn"),
        method: 'post',
        data
    })
}

//生成及重置巡检任务配置信息
export function buildPatrolTask(data) {
    return request({
        url: getUrl("admin/enterpriseTask/buildPatrolTask"),
        method: 'post',
        data
    })
}

export function getPatrolTask(data) {
    return request({
        url: getUrl("admin/enterpriseTask/getPatrolTask"),
        method: 'post',
        data
    })
}